package com.siao.example.libaray.display.ui
{
	import com.siao.component.Stack;
	import com.siao.display.Align;
	import com.siao.example.common.ui.CommonButton;
	
	/**
	 * 显示菜单
	 * @author SiaoLeon
	 */
	public class DisplayMenuBar extends Stack
	{
		// -------------------------------------------------------------------------------------------------------- 静态常量
		
		// -------------------------------------------------------------------------------------------------------- 静态变量
		
		// -------------------------------------------------------------------------------------------------------- 静态方法
		
		// -------------------------------------------------------------------------------------------------------- 静态函数
		
		// -------------------------------------------------------------------------------------------------------- 属性
		
		/**
		 * 文本示例按钮
		 */
		public var btnText:CommonButton;
		
		/**
		 * 布局示例按钮
		 */
		public var btnLayout:CommonButton;
		
		/**
		 * 位图示例按钮
		 */
		public var btnBitmap:CommonButton;
		
		// -------------------------------------------------------------------------------------------------------- 变量
		
		// -------------------------------------------------------------------------------------------------------- 构造
		
		/**
		 * 构造函数
		 */
		public function DisplayMenuBar(orientation:uint=3)
		{
			super(orientation);
			
			this.marginTop = 40;
			this.height = 40;
			this.padding = 10;
			this.spacing = 10;
			
			this.contentAlignH = Align.LEFT;
			
			this.draw(0XFF0000, 0.2);
		}
		
		// -------------------------------------------------------------------------------------------------------- 方法
		
		// -------------------------------------------------------------------------------------------------------- 函数
		
		override protected function onAddedToStage():void
		{
			this.btnText = new CommonButton("文本示例");
			this.addChild(this.btnText);
			
			this.btnLayout = new CommonButton("布局示例");
			this.addChild(this.btnLayout);
			
			this.btnBitmap = new CommonButton("位图示例");
			this.addChild(this.btnBitmap);
		}
		
		override protected function onRemovedFromStage():void
		{
			this.clear();
		}
	
	}
}
